GXCountShapeContours
You can use theGXCountShapeContours
function to determine the number of contours in a shape.
long GXCountShapeContours(gxShape source);
source
- A reference to the shape whose contours you want to count.
- function result
- The number of contours in the source shape.
DESCRIPTION
TheGXCountShapeContours
function returns as its function result the number of contours in the source shape. For polygon and path shapes, this number indicates the total number of polygon contours or path contours contained in the shape. For points, lines, curves, and rectangles, this function returns the value 1. For empty and full shapes, this function posts thegraphics_type_does_not_have_multiple_contours
error.If you provide a source shape that is not one of the geometric shape types, this function performs the actions described in the following table:
Shape type Action taken bitmap Always returns 1 as the function result picture Returns the number of picture items text Returns the number of glyphs glyph Returns the number of glyphs layout Returns the byte length of the text ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory shape_is_nil graphic_type_does_not_have_multiple_contours (debugging version) SEE ALSO
For a discussion of contours, see "Shape Geometry" on page 2-9, "Polygon Shapes" on page 2-22, and "Path Shapes" on page 2-25.To learn how this function works for typographic shape types, see Inside Macintosh: QuickDraw GX Typography.
To determine the number of points in a specific contour of a shape, use the
GXCountShapePoints
function, which is described in the next section.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help